//统一管理首页模块接口
import request from '@/utils/request'
//通过枚举管理模块的接口地址
const API={
    //查询所有的数据根据一定条件(可过滤假删除，选择性过滤审核状态相应数据)
    WORKALLRUL:'/work/getAll/',
    //查询所有数据
    WORKTOTALURL:'/work/getTotal',
    //根据值班编号查询该信息
    WORKBYWORKNUMURL:'/work/getAllByWorkNum/',
    //批量假删除
    DELETESURL:'/work/deleteByWorkNums',
    //增加值班数据
    ADDWORKURL:'/work/addWork',
    //改变值班状态
    MODIFYSTATUSURL:'/work/workStatus/',
    //修改值班信息
    MODIFYWORKURL:'/work/modifyWork',
    //修改值班预约人数
    MODIFYWORKNUMURL:'/work/modifyWorkNum/'
    
}
export const reqGetWorkAll=(page,limit,workInfo)=>request.post(API.WORKALLRUL+`${page}/${limit}`,workInfo);
export const reqGetWorkTotal=(workInfo)=>request.post(API.WORKTOTALURL,workInfo);
export const reqGetWorkByNum=(workNum)=>request.get(API.WORKBYWORKNUMURL+`${workNum}`);
export const reqDeletes=(workNums)=>request.post(API.DELETESURL,workNums);
export const reqAddWork=(workInfo)=>request.post(API.ADDWORKURL,workInfo);
export const reqModifyStatus=(workNum,isFree)=>request.get(API.MODIFYSTATUSURL+`${workNum}/${isFree}`);
export const reqModifyWork=(workInfo)=>request.post(API.MODIFYWORKURL,workInfo);
export const reqModifyWorkNum=(workNum,num)=>request.get(API.MODIFYWORKNUMURL+`${workNum}/${num}`)